package com.youkeyi.ddy.cloud.common.api.application.business.crm.config;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.config.dto.BusinessCustomerInputConfigListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.config.param.*;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统配置
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】customer input config"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessCustomerInputConfigCloudServiceFallback.class)
@RequestMapping("/business/customer/input/config")
public interface BusinessCustomerInputConfigCloudService {

    // 查询配置列表
    @ApiOperation(value = "Query System CustomerInputConfig List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.config.BusinessCustomerInputConfigCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessCustomerInputConfigListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System CustomerInputConfig List", dataType = "BusinessCustomerInputConfigListCloudParam", dataTypeClass = BusinessCustomerInputConfigListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessCustomerInputConfigListCloudDto list(BusinessCustomerInputConfigListCloudParam param);

    // 创建配置
    @ApiOperation(value = "Create System Corp", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.config.BusinessCustomerInputConfigCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create System Corp", dataType = "BusinessCustomerInputConfigCreateCloudParam", dataTypeClass = BusinessCustomerInputConfigCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessCustomerInputConfigCreateCloudParam param);


    // 编辑配置
    @ApiOperation(value = "Update System Corp", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.config.BusinessCustomerInputConfigCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update System Corp", dataType = "BusinessCustomerInputConfigUpdateCloudParam", dataTypeClass = BusinessCustomerInputConfigUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessCustomerInputConfigUpdateCloudParam param);


    // 删除配置
    @ApiOperation(value = "Delete System Corp", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.config.BusinessCustomerInputConfigCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete System Corp", dataType = "BusinessCustomerInputConfigDeleteCloudParam", dataTypeClass = BusinessCustomerInputConfigDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessCustomerInputConfigDeleteCloudParam param);

}
